﻿/**********************************************************************
 * @file   FITKAcousticsAbstractLoad.h
 * @brief  载荷数据抽象类声明
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2024-12-05
 *********************************************************************/

#ifndef _FITK_ACOUSTICS_ABSTRACT_LOAD_H_
#define _FITK_ACOUSTICS_ABSTRACT_LOAD_H_

#include "FITKAcousticsPhysicsAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"

namespace Acoustics
{
    /**
     * @brief  载荷数据抽象类
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2024-12-05
     */
    class  FITKAcousticsPhysicsAPI FITKAcousticsAbstractLoad : 
        public Core::FITKAbstractNDataObject
    {
        Q_OBJECT;
    public:
        /**
         * @brief 载荷类型
         * @author lishun@diso.cn
         * @date 2024-11-20
         */
        enum AcousticsLoadType
        {
            None = -1,               ///< 空
            ImportNoiseHVAC,         ///< HVAC噪声导入
            ConstraintSEABeam,       ///< SEA梁约束
            ConstraintSEAShell,      ///< SEA板约束
            ConstraintSEAAcoustic,   ///< SEA声腔约束
            ConstraintFESubsys,      ///< FE子系统约束
            PowerSEABeam,            ///< SEA梁功率源
            PowerSEAShell,           ///< SEA板功率源
            PowerSEAAcoustic,        ///< SEA声腔功率源
            PowerFESubsys,           ///< FE子系统功率源
            ExcitationForceMoments,  ///< 力和力矩激励
            ExcitationMonopole,      ///< 单极子
        };
        Q_ENUM(AcousticsLoadType);

    public:
        /**
         * @brief    Create the FITKAcousticsAbstractLoad object
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-05
         */
        explicit FITKAcousticsAbstractLoad();
        /**
         * @brief    Destroy the FITKAcousticsAbstractLoad object
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-05
         */
        virtual ~FITKAcousticsAbstractLoad();
        /**
         * @brief    Get the Acoustics Load Type object
         * @return   AcousticsLoadType
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-05
         */
        virtual AcousticsLoadType getAcousticsLoadType() = 0;
        /**
         * @brief    设置启用状态
         * @param[i] enabled 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-05
         */
        void setEnabledState(bool enabled);
        /**
         * @brief    获取启用状态
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-05
         */
        bool getEnabledState();
        /**
         * @brief    设置注释
         * @param[i] notes     注释
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-05
         */
        void setNotes(QString notes);
        /**
         * @brief    获取注释
         * @return   QString   注释
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-05
         */
        QString getNotes();
        /**
         * @brief    设置连接器对象id
         * @param[i] objID 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-05
         */
        void setConnectionObjID(int objID);
        /**
         * @brief    获取连接器对象id
         * @return   int
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-05
         */
        int getConnectionObjID();
        /**
         * @brief    获取连接器对象名称
         * @return   QString
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-09
         */
        QString getConnectionObjName();
        /**
         * @brief    设置连接位置
         * @param[i] location 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-06
         */
        void setConnectionLocation(double* location);
        /**
         * @brief    获取连接位置
         * @param[o] location 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-06
         */
        void getConnectionLocation(double* location);

    protected:
        /**
         * @brief  启用状态
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-05
         */
        bool _enabledState{ true };
        /**
         * @brief  注释
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-05
         */
        QString _notes{};
        /**
         * @brief  连接对象ID
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-05
         */
        int _connectObjID{ -1 };
        /**
         * @brief  连接位置{x,y,z}
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-06
         */
        double _connectLocation[3]{ 0.0, 0.0, 0.0 };
    };
}


#endif // _FITK_ACOUSTICS_ABS_CONSTRAINT_H_